;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.7.1 #0 (MSVC)
;--------------------------------------------------------
; NY8A port
;--------------------------------------------------------
	.file	"app\app.c"
	list	p=NY8B062E,c=on
	#include "ny8b062e.inc"
	.debuginfo language C89
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	extern	_sinf
	extern	_cosf
	extern	_tanf
	extern	_cotf
	extern	_asinf
	extern	_acosf
	extern	_atanf
	extern	_atan2f
	extern	_sinhf
	extern	_coshf
	extern	_tanhf
	extern	_expf
	extern	_logf
	extern	_log10f
	extern	_powf
	extern	_sqrtf
	extern	_fabsf
	extern	_frexpf
	extern	_ldexpf
	extern	_ceilf
	extern	_floorf
	extern	_modff
	extern	_isnan
	extern	_isinf
	extern	_multi_16b
	extern	_read_14bit_rom
	extern	_Adc_Start
	extern	_Adc_SetVref
	extern	_Adc_GetOnce
	extern	_Mcu_Delayus
	extern	_Mcu_Delayms
	extern	_CapSS_Init
	extern	_CapSS_GetValue
	extern	_TouchKey_Init
	extern	_TouchKey_Scan
	extern	_Btn_Loop
	extern	_Btn_Init
	extern	_SoftCT_EvIOInt
	extern	_SoftCT_EvTimeout
	extern	_SoftCT_GetEvent
	extern	_SoftCT_Run
	extern	_SoftCT_Stop
	extern	_PORTAbits
	extern	_PORTBbits
	extern	_PCONbits
	extern	_BWUCONbits
	extern	_ABPLCONbits
	extern	_BPHCONbits
	extern	_INTEbits
	extern	_INTFbits
	extern	_ADMDbits
	extern	_ADRbits
	extern	_ADVREFHbits
	extern	_ADCRbits
	extern	_AWUCONbits
	extern	_PACONbits
	extern	_ADJMDbits
	extern	_INTEDGbits
	extern	_ANAENbits
	extern	_RFCbits
	extern	_INTE2bits
	extern	__Adc_mDiscard
	extern	__Polsys_mTicked
	extern	_TouchKey_mKeyStatus
	extern	__Btn_mIsDown
	extern	_SoftCT_mCaptureValue
	extern	_INDF
	extern	_TMR0
	extern	_PCL
	extern	_STATUS
	extern	_FSR
	extern	_PORTA
	extern	_PORTB
	extern	_PCON
	extern	_BWUCON
	extern	_PCHBUF
	extern	_ABPLCON
	extern	_BPHCON
	extern	_INTE
	extern	_INTF
	extern	_ADMD
	extern	_ADR
	extern	_ADD
	extern	_ADVREFH
	extern	_ADCR
	extern	_AWUCON
	extern	_PACON
	extern	_ADJMD
	extern	_INTEDG
	extern	_TMRH
	extern	_ANAEN
	extern	_RFC
	extern	_TM3RH
	extern	_INTE2
	extern	_TMR1
	extern	_T1CR1
	extern	_T1CR2
	extern	_PWM1DUTY
	extern	_PS1CV
	extern	_BZ1CR
	extern	_IRCR
	extern	_TBHP
	extern	_TBHD
	extern	_TMR2
	extern	_T2CR1
	extern	_T2CR2
	extern	_PWM2DUTY
	extern	_PS2CV
	extern	_BZ2CR
	extern	_OSCCR
	extern	_TMR3
	extern	_T3CR1
	extern	_T3CR2
	extern	_PWM3DUTY
	extern	_PS3CV
	extern	_BZ3CR
	extern	_P4CR1
	extern	_PWM4DUTY
	extern	_IOSTA
	extern	_IOSTB
	extern	_APHCON
	extern	_PS0CV
	extern	_BODCON
	extern	_CMPCR
	extern	_PCON1
	extern	_T0MD

	extern PSAVE
	extern SSAVE
	extern WSAVE
	extern STK04
	extern STK03
	extern STK02
	extern STK01
	extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	extern	_App_Load
	extern	_Btn_Event

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
.segment "uninit"
r0x1000:
	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	udata_ovr
;--------------------------------------------------------
; code
;--------------------------------------------------------
;***
;  pBlock Stats: dbName = C
;***
;has an exit
;1 compiler assigned register :
;   r0x1000
;; Starting pCode block
.segment "code"; module=app, function=_Btn_Event
	.debuginfo subprogram _Btn_Event
;local variable name mapping:
	.debuginfo variable _e=r0x1000,enc=unsigned
_Btn_Event:
; 2 exit points
	.line	36, "app\app.c"; 	void Btn_Event(btn_ev_t e)
	BANKSEL	r0x1000
	MOVAR	r0x1000
	.line	38, "app\app.c"; 	switch (e)
	XORIA	0x01
	BTRSC	STATUS,2
	MGOTO	_00109_DS_
	MOVR	r0x1000,W
	XORIA	0x02
	BTRSC	STATUS,2
	MGOTO	_00110_DS_
	MGOTO	_00113_DS_
_00109_DS_:
	.line	41, "app\app.c"; 	Board_LedOn();
	BSR	_PORTB,2
	.line	42, "app\app.c"; 	break;
	MGOTO	_00113_DS_
_00110_DS_:
	.line	44, "app\app.c"; 	Board_LedOff();
	BCR	_PORTB,2
_00113_DS_:
	.line	49, "app\app.c"; 	}
	RETURN	
; exit point of _Btn_Event

;***
;  pBlock Stats: dbName = C
;***
;has an exit
;functions called:
;   _Btn_Init
;   _Btn_Init
;; Starting pCode block
.segment "code"; module=app, function=_App_Load
	.debuginfo subprogram _App_Load
_App_Load:
; 2 exit points
	.line	30, "app\app.c"; 	Board_Init();
	MOVIA	0x17
	MOVAR	_INTEDG
	MOVIA	0xff
	MOVAR	_PORTA
	MOVIA	0x3e
	MOVAR	_PORTB
	MOVIA	0xfe
	IOST	_IOSTA
	MOVIA	0xfa
	IOST	_IOSTB
	BANKSEL	_PCON
	BCR	_PCON,4
	MOVIA	0x21
	IOST	_APHCON
	MOVIA	0x05
	MOVAR	_BPHCON
	.line	31, "app\app.c"; 	Btn_Init();
	MCALL	_Btn_Init
	.line	32, "app\app.c"; 	Board_LedOff();
	BCR	_PORTB,2
	.line	33, "app\app.c"; 	}
	RETURN	
; exit point of _App_Load


;	code size estimation:
;	   31+    2 =    33 instructions (   70 byte)

	end
